package dongshi.daddy.main;

import dongshi.daddy.enbaledubboconfigbinding.MyEnableDubboConfigBindingConsumerConfiguration;
import dongshi.daddy.enbaledubboconfigbinding.MyEnableDubboConfigBindingService;
import dongshi.daddy.service.enabledubbobinding.MyEnableDubboBindingService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyEnableDubboConfigBindingMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ac
                = new AnnotationConfigApplicationContext();
        ac.register(MyEnableDubboConfigBindingConsumerConfiguration.class);
        ac.refresh();

        MyEnableDubboBindingService myEnableDubboConfigBindingService
                = ac.getBean("myEnableDubboConfigBindingService", MyEnableDubboConfigBindingService.class).returnProviderService();
        System.out.println(myEnableDubboConfigBindingService.sayHi("younger sister in USA"));
    }
}
